<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>

selection_test(
  '<div contenteditable dir="rtl">|abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">|abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  '27-0 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">a|bc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">|abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  '27-1 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">ab|c<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">a|bc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  '27-2 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc|<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">ab|c<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  '27-3 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>|\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc|<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  '27-4 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0|\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>|\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  '27-5 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1|\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>\u05D0|\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  '27-6 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2|<img><img>\u05D3\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1|\u05D2<img><img>\u05D3\u05D4\u05D5ghi</div>',
  '27-7 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img>|<img>\u05D3\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2|<img><img>\u05D3\u05D4\u05D5ghi</div>',
  '27-8 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>|\u05D3\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img>|<img>\u05D3\u05D4\u05D5ghi</div>',
  '27-9 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3|\u05D4\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>|\u05D3\u05D4\u05D5ghi</div>',
  '27-10 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4|\u05D5ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3|\u05D4\u05D5ghi</div>',
  '27-11 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5|ghi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4|\u05D5ghi</div>',
  '27-12 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5g|hi</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5|ghi</div>',
  '27-13 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5gh|i</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5g|hi</div>',
  '27-14 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5ghi|</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc<input>\u05D0\u05D1\u05D2<img><img>\u05D3\u05D4\u05D5gh|i</div>',
  '27-15 rtl right character');
</script>
